package com.tjw.ec.upms.api.feign;

import com.tjw.ec.common.core.constant.ServiceNameConstants;
import com.tjw.ec.common.core.util.PageUtils;
import com.tjw.ec.common.core.util.Response;
import com.tjw.ec.common.web.config.FeignOauth2RequestInterceptor;
import com.tjw.ec.upms.api.entity.ActionEntity;
import com.tjw.ec.upms.api.feign.factory.RemoteActionServiceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * 远程调用接口 : 系统中所有操作的动作表;
 *
 * @author T-junwen
 * @email t-junwen@foxmail.com
 * @date 2019-07-27 17:15:06
 */
@FeignClient(contextId = "remoteActionService", value = ServiceNameConstants.UMPS_SERVICE, configuration = FeignOauth2RequestInterceptor.class, fallbackFactory = RemoteActionServiceFallbackFactory.class)
public interface RemoteActionService {

    /**
     * @Title: 远程调用动作分页列表
     * @Param: [params]
     * @return: com.baomidou.mybatisplus.extension.api.R<com.tjw.ec.common.core.util.PageUtils < com.tjw.ec.upms.api.entity.ActionEntity>>
     * @Author: 田俊文
     * @Date: 2019/8/2 9:06
     * @Throws:
     */
    @GetMapping("action/list")
    Response<PageUtils<ActionEntity>> page(@RequestParam Map<String, Object> params);

    /**
     * 信息
     */
    @GetMapping("action/info/{actionId}")
    Response<ActionEntity> info(@PathVariable("actionId") String actionId);
}

